Individual strains survival in water, in vitro assay performed from 20220301 - 20220307. Second round from 20220308-0314. Third round from 20220321-0324. Fourth round 20220516-0520.
20 mL of volvic water with each strain at final OD=0.001
(~106 CFU/mL)
DMSO at 1:10000, Loperamide at 10 mg/L
Add loperamide and strains to water. Sample water at 0 h, 3 h, 6 hours on day 1. Then, daily until 3 days post inoculation. 24 h, 48 h, 72 h.
At each timepoint:
Make 0 to -3 dilutions in 96-well plates, in triplicate
Plate 10 µL microdrops on big square plates.
2 square plates total per timepoint
Put plates at 28C for 2 days, then count colonies.
Treatment (Strain): Bc1, Bc2, Bc3, Bc4, Bc10, W6, W8, Mz8, Fjohn
Loperamide Treatment: Control (water only), DMSO, Loperamide 10 mg/L
library(tidyverse)
library(scales)
library(ggpubr)
library(ungeviz)
library(ggtext)
library(rmdformats)
# set global theme
theme_set(theme_minimal()+
theme(panel.grid.major.y = element_line(color="grey80"), strip.text=element_text(size=16),
strip.text.y = element_text(angle=0), plot.caption = element_text(size=10),
panel.grid.major.x = element_blank(),legend.position="top",
plot.background = element_rect(fill="transparent", color="transparent"),
axis.ticks = element_line(inherit.blank = FALSE),
panel.background = element_rect(color="grey50", size=2),
legend.title = element_text(size=18),
axis.text = element_text(size=15), axis.title = element_text(size=18),
legend.text = element_text(size=16), plot.title = element_text(hjust=0.5)))
# set global options for code output
knitr::opts_chunk$set(echo=TRUE, warning=FALSE,message=FALSE)
# import individual strain data from exp 1
datacfus1 <-
readxl::read_xlsx("LoperamideWaterSurvivalCFUs.xlsx", sheet="Round1") %>%
drop_na(DF) %>%
mutate(LoperamideTreatment=factor(LoperamideTreatment,
levels=c("None", "DMSO", "Loperamide 10 mg/L"),
labels=c("Control","DMSO", "Loperamide")),
Treatment = factor(Treatment, levels=c("Bc1","Bc2","Bc3","Bc4","Bc10"))) %>%
add_column(Assay=1)
# import individual strain data from exp 2
datacfus2 <-
readxl::read_xlsx("LoperamideWaterSurvivalCFUs.xlsx", sheet="Round2") %>%
drop_na(DF) %>%
mutate(LoperamideTreatment=factor(LoperamideTreatment,
levels=c("None", "DMSO", "Loperamide 10 mg/L"),
labels=c("Control","DMSO", "Loperamide")),
Treatment = factor(Treatment, levels=c("Bc1","Bc2","Bc3","Bc4","Bc10"))) %>%
add_column(Assay=2)
# import individual strain data from exp 3
datacfus3 <-
readxl::read_xlsx("LoperamideWaterSurvivalCFUs.xlsx", sheet="Round3") %>%
drop_na(DF) %>%
mutate(LoperamideTreatment=factor(LoperamideTreatment,
levels=c("None", "DMSO", "Loperamide 10 mg/L"),
labels=c("Control","DMSO", "Loperamide")),
Treatment = factor(Treatment, levels=c("Bc1","Bc2","Bc3","Bc4","Bc10"))) %>%
add_column(Assay=3)
# import individual strain data from exp 4
datacfus4 <-
readxl::read_xlsx("LoperamideWaterSurvivalCFUs.xlsx", sheet="Round4") %>%
drop_na(DF) %>%
mutate(LoperamideTreatment=factor(LoperamideTreatment,
levels=c("None", "DMSO", "Loperamide 10 mg/L"),
labels=c("Control","DMSO", "Loperamide")),
Treatment = factor(Treatment, levels=c("W6","W8","Mz8")))
datacfus5 <-
readxl::read_xlsx("LoperamideWaterSurvivalCFUs.xlsx", sheet="Round5") %>%
drop_na(DF) %>%
mutate(LoperamideTreatment=factor(LoperamideTreatment,
levels=c("None", "DMSO", "Loperamide 10 mg/L"),
labels=c("Control","DMSO", "Loperamide")),
Treatment = factor(Treatment, levels=c("W6","W8","Mz8","Fjohn","Mz1")))
straininfo <- readxl::read_xlsx("../LoperamideStrainInfo.xlsx") %>%
mutate(Strain=recode(Strain, "W6t"="W6"))
dataallCFUs <- full_join(datacfus1, datacfus2 %>% filter(Treatment!="Bc4")) %>%
full_join(datacfus3) %>%
full_join(datacfus4) %>% full_join(datacfus5) %>%
left_join(straininfo, by=c("Treatment"="Strain")) %>%
mutate(CodeName=factor(CodeName, levels=unique(straininfo$CodeName)))
longdata <- dataallCFUs %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
select(Treatment, LoperamideTreatment, Timepoint_hrs, RepCFUs)
statsbydayCFUs <- compare_means(data=longdata,
RepCFUs~LoperamideTreatment,
group.by = c("Treatment","Timepoint_hrs")) %>%
left_join(straininfo, by=c("Treatment"="Strain")) %>%
mutate(CodeName=factor(CodeName, levels=unique(straininfo$CodeName)))
gt::gt(statsbydayCFUs %>% filter(p.format<0.05 & group1=="DMSO"))
| Treatment | Timepoint_hrs | .y. | group1 | group2 | p | p.adj | p.format | p.signif | method | UGBcode | Stock | Media | PaperCode | PaperName | CodeName | Isolation source |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bc1 | 24 | RepCFUs | DMSO | Loperamide | 0.033700303 | 1.000 | 0.0337 | * | Wilcoxon | NA | RS1 | LB | S7 | Aeromonas veronii 1 | S7. *Aeromonas veronii 1* | Conventional zebrafish water |
| Bc10 | 24 | RepCFUs | DMSO | Loperamide | 0.041835331 | 1.000 | 0.0418 | * | Wilcoxon | NA | RS10 | LB | S3 | Pseudomonas nitroreducens | S3. *Pseudomonas nitroreducens* | Conventional zebrafish water |
| Bc10 | 72 | RepCFUs | DMSO | Loperamide | 0.000401039 | 0.078 | 0.0004 | *** | Wilcoxon | NA | RS10 | LB | S3 | Pseudomonas nitroreducens | S3. *Pseudomonas nitroreducens* | Conventional zebrafish water |
| Bc10 | 144 | RepCFUs | DMSO | Loperamide | 0.004998125 | 0.940 | 0.0050 | ** | Wilcoxon | NA | RS10 | LB | S3 | Pseudomonas nitroreducens | S3. *Pseudomonas nitroreducens* | Conventional zebrafish water |
| W8 | 6 | RepCFUs | DMSO | Loperamide | 0.023968274 | 1.000 | 0.0240 | * | Wilcoxon | NA | RS17 | LB | S8 | Rhizobium sp. | S8. *Rhizobium sp.* | Conventional zebrafish water |
| W6 | 48 | RepCFUs | DMSO | Loperamide | 0.004922036 | 0.940 | 0.0049 | ** | Wilcoxon | NA | RS15 | TYES | S2 | Variovorax gossypii | S2. *Variovorax gossypii* | Conventional zebrafish water |
| W6 | 72 | RepCFUs | DMSO | Loperamide | 0.004922036 | 0.940 | 0.0049 | ** | Wilcoxon | NA | RS15 | TYES | S2 | Variovorax gossypii | S2. *Variovorax gossypii* | Conventional zebrafish water |
| W8 | 72 | RepCFUs | DMSO | Loperamide | 0.044200634 | 1.000 | 0.0442 | * | Wilcoxon | NA | RS17 | LB | S8 | Rhizobium sp. | S8. *Rhizobium sp.* | Conventional zebrafish water |
datacfus1 %>% filter(LoperamideTreatment=="Control") %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x=Timepoint_hrs, y=RepCFUs,
color=Treatment, fill=Treatment, shape=Treatment))+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.5, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=Treatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed", "dotdash","longdash"))+
scale_shape_manual(values=c(21,22,23,24,25))+
scale_fill_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
scale_color_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
labs(y="CFUs per mL", x="Time (hours)", color=NULL, shape=NULL, fill=NULL, lty=NULL,
title="Survival in water, control conditions")+
theme(legend.key.width = unit(1.33,"cm"), legend.position = "right")
#ggsave("WaterInVitro_LoperamideCFUs_control1.png", bg="transparent", width = 7, height = 5)
datacfus1 %>% pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c("grey20","navy","aquamarine4"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))
#ggsave("WaterInVitro_LoperamideCFUs1.png", bg="transparent", width = 12, height = 5)
datacfus1 %>%
ggplot(aes(x = Timepoint_hrs, y=CFUs_permL,
lty=LoperamideTreatment, color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
geom_point(size=3) + geom_line(lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(1e4,1e7), # expand=c(0,0),
labels = trans_format('log10', math_format(10^.x)))+
scale_color_manual(values=c("grey20","navy","aquamarine4"))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))
#ggsave("WaterInVitro_LoperamideCFUs2.png", bg="transparent", width = 11, height = 6)
datacfus2 %>% filter(LoperamideTreatment=="Control") %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x=Timepoint_hrs, y=RepCFUs,
color=Treatment, fill=Treatment, shape=Treatment))+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.5, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=Treatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', #limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed", "dotdash","longdash"))+
scale_shape_manual(values=c(21,22,23,24,25))+
scale_fill_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
scale_color_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
labs(y="CFUs per mL", x="Time (hours)", color=NULL, shape=NULL, fill=NULL, lty=NULL,
title="Survival in water, control conditions")+
theme(legend.key.width = unit(1.33,"cm"), legend.position = "right")
#ggsave("WaterInVitro_LoperamideCFUs_control2.png", bg="transparent", width = 7, height = 5)
datacfus2 %>% pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(NA, 1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c("grey20","navy","aquamarine4"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))
#ggsave("WaterInVitro_LoperamideCFUs2.png", bg="transparent", width = 12, height = 5)
datacfus3 %>% filter(LoperamideTreatment=="Control") %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x=Timepoint_hrs, y=RepCFUs,
color=Treatment, fill=Treatment, shape=Treatment))+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.5, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=Treatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', #limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed", "dotdash","longdash"))+
scale_shape_manual(values=c(21,22,23,24,25))+
scale_fill_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
scale_color_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
labs(y="CFUs per mL", x="Time (hours)", color=NULL, shape=NULL, fill=NULL, lty=NULL,
title="Survival in water, control conditions")+
theme(legend.key.width = unit(1.33,"cm"), legend.position = "right")
#ggsave("WaterInVitro_LoperamideCFUs_control3.png", bg="transparent", width = 7, height = 5)
datacfus3 %>% pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(NA, 1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c("grey20","navy","aquamarine4"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))
#ggsave("WaterInVitro_LoperamideCFUs3.png", bg="transparent", width = 12, height = 5)
datacfus4 %>% filter(LoperamideTreatment=="Control") %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x=Timepoint_hrs, y=RepCFUs,
color=Treatment, fill=Treatment, shape=Treatment))+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.5, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=Treatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', #limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed", "dotdash","longdash"))+
scale_shape_manual(values=c(21,22,23,24,25))+
scale_fill_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
scale_color_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
labs(y="CFUs per mL", x="Time (hours)", color=NULL, shape=NULL, fill=NULL, lty=NULL,
title="Survival in water, control conditions")+
theme(legend.key.width = unit(1.33,"cm"), legend.position = "right")
#ggsave("WaterInVitro_LoperamideCFUs_control3.png", bg="transparent", width = 7, height = 5)
datacfus4 %>% pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(NA, 1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c("grey20","navy","aquamarine4"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))
#ggsave("WaterInVitro_LoperamideCFUs3.png", bg="transparent", width = 12, height = 5)
datacfus5 %>% filter(LoperamideTreatment=="Control") %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x=Timepoint_hrs, y=RepCFUs,
color=Treatment, fill=Treatment, shape=Treatment))+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.5, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=Treatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', #limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed", "dotdash","longdash"))+
scale_shape_manual(values=c(21,22,23,24,25))+
scale_fill_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
scale_color_manual(values=nationalparkcolors::park_palette("Saguaro", n=5))+
labs(y="CFUs per mL", x="Time (hours)", color=NULL, shape=NULL, fill=NULL, lty=NULL,
title="Survival in water, control conditions")+
theme(legend.key.width = unit(1.33,"cm"), legend.position = "right")
#ggsave("WaterInVitro_LoperamideCFUs_control3.png", bg="transparent", width = 7, height = 5)
datacfus5 %>% pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', limits=c(NA, 1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c("grey20","navy","aquamarine4"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))
#ggsave("WaterInVitro_LoperamideCFUs3.png", bg="transparent", width = 12, height = 5)
dataallCFUs %>% filter(LoperamideTreatment=="Control") %>% filter(Timepoint_hrs<80) %>%
pivot_longer(Rep1:Rep3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
drop_na(PaperCode) %>%
ggplot(aes(x=Timepoint_hrs, y=RepCFUs,
color=PaperCode, fill=PaperCode, shape=PaperCode))+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.5, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=PaperCode), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', #limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
# scale_linetype_manual(values=c("solid","dotted","dashed", "dotdash","longdash"))+
scale_shape_manual(values=c(21,22,23,24,25,21,22,23,24,25))+
scale_fill_manual(values=c(nationalparkcolors::park_palette("Saguaro", n=6),"grey","navy","lightcoral","deepskyblue"))+
scale_color_manual(values=c(nationalparkcolors::park_palette("Saguaro", n=6),"grey","navy","lightcoral","deepskyblue"))+
labs(y="CFUs per mL", x="Time (hours)", color=NULL, shape=NULL, fill=NULL, lty=NULL,
title="Survival in water, control conditions")+
theme(legend.key.width = unit(1.33,"cm"), legend.position = "right")
#ggsave("WaterInVitro_LoperamideCFUs_control_all.png", bg="transparent", width = 7, height = 5)
statsbydayCFUsformat <- statsbydayCFUs %>% filter(p.signif!="ns") %>% filter(Timepoint_hrs<80) %>%
filter(Timepoint_hrs!=0)
dataallCFUs %>% pivot_longer(Rep1:Rep3) %>% filter(Timepoint_hrs<80) %>%
filter(Timepoint_hrs !=3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_wrap(.~CodeName, ncol=5)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=4) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=1) +
geom_text(data=statsbydayCFUsformat, aes(label="*", y=5e6, color=NA, shape=NA), size=9, color="#0fc08e",
show.legend=FALSE)+
scale_y_continuous(trans = 'log10', limits=c(NA,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_x_continuous(breaks=c(0,6,24,48,72))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
labs(y="CFUs per mL", x="Time since treatment (hours)",
# title="All 3 experiments together",
color=NULL, shape=NULL, lty=NULL)+
theme(strip.text = element_markdown(size = 16, face="bold"),
panel.grid.major.x = element_line(size=0.5),
panel.grid.minor.x = element_blank(),panel.grid.minor.y = element_blank(),
legend.text = element_text(size=18), legend.key.width = unit(2,"cm"))
ggsave("WaterInVitro_LoperamideCFUs.png", bg="transparent", width = 19, height = 9.5)
statsbydayCFUsformat <- statsbydayCFUs %>% filter(Timepoint_hrs %in% c(6,24)) %>%
filter(p.signif!="ns")
survivalsublong<-dataallCFUs %>% pivot_longer(Rep1:Rep3) %>% filter(Timepoint_hrs<30) %>%
filter(Timepoint_hrs!=12) %>% filter(Timepoint_hrs!=3) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_wrap(.~CodeName, ncol=1)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=4) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=1) +
geom_text(data=statsbydayCFUsformat, aes(label="*", y=2e6, color=NA, shape=NA), size=9, color="#0fc08e",
show.legend=FALSE)+
scale_y_continuous(trans = 'log10', breaks=c(1e5, 1e6), # limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_x_continuous(breaks=c(0,6,12, 24))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
labs(y="CFUs per mL", x="Time since treatment (hours)",
# title="All 3 experiments together",
color=NULL, shape=NULL, lty=NULL)+
theme(strip.text = element_markdown(size = 16, face="bold"),
panel.grid.minor.x = element_blank(),
legend.text = element_text(size=20), legend.key.width = unit(2,"cm"),
panel.background = element_rect(size=1, fill="white"))
survivalsublong<-dataallCFUs %>% pivot_longer(Rep1:Rep3) %>% filter(Timepoint_hrs==24) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = LoperamideTreatment, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_wrap(.~CodeName, ncol=1, scale="free_x")+
stat_summary(geom="errorbar", fun.data="mean_sd", width=0.2, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=4) +
geom_text(data=statsbydayCFUsformat, aes(label="*", x=group2, y=2.5e6, color=NA, shape=NA), size=9, color="#0fc08e",
show.legend=FALSE)+
scale_y_continuous(trans = 'log10', breaks=c(1e5, 1e6), # limits=c(1e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
labs(y="CFUs per mL water at 24 hr", x="Treatment",
# title="All 3 experiments together",
color=NULL, shape=NULL, lty=NULL)+
theme(strip.text = element_markdown(size = 16, face="bold"),
panel.grid.minor.x = element_blank(),
legend.text = element_text(size=20), legend.key.width = unit(2,"cm"),
axis.line = element_line(size=0.5),axis.text.x = element_blank(),axis.ticks.x = element_blank(),
panel.background = element_blank())
survivalsublong
#ggsave("WaterInVitro_LoperamideCFUs.png", bg="transparent", width = 12, height = 6)
dataallCFUs %>% pivot_longer(Rep1:Rep3) %>% filter(Timepoint_hrs<80) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment, group=LoperamideTreatment))+
facet_wrap(.~Treatment, scales = "free_y", ncol=5)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=1) +
scale_y_continuous(trans = 'log10', limits=c(1e2,1e7),
labels = trans_format('log10', math_format(10^.x)))+
#scale_x_continuous(breaks=c(0,6,12,18,24))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
labs(y="CFUs per mL", x="Time since treatment (hours)",
color=NULL, shape=NULL, lty=NULL)+
theme(text=element_text(family="Avenir"), #strip.text = element_markdown(size = 16),
axis.text = element_text(size=14),
axis.title = element_text(size=18),
legend.position = "bottom", legend.background = element_blank(),
legend.text = element_text(size=18), legend.key.width = unit(1.4,"cm"),
plot.background = element_blank(),
strip.background = element_blank(),
panel.background = element_rect(size=1, fill="white"))
#ggsave("WaterInVitro_LoperamideCFUs24avenir.png", bg="transparent", width = 16, height = 5)
dataallCFUs %>% pivot_longer(Rep1:Rep3) %>% filter(Timepoint_hrs<25) %>%
mutate(RepCFUs=(1000/VolPlated_ul)*DF*value) %>%
ggplot(aes(x = Timepoint_hrs, y=RepCFUs,
color=LoperamideTreatment, shape=LoperamideTreatment, group=LoperamideTreatment))+
facet_grid(.~Treatment)+
stat_summary(geom="errorbar", fun.data="mean_sd", width=1, show.legend = FALSE)+
stat_summary(geom="point", fun="mean", size=3) +
stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=1) +
scale_y_continuous(trans = 'log10', limits=c(5e4,1e7),
labels = trans_format('log10', math_format(10^.x)))+
scale_x_continuous(breaks=c(0,6,12,18,24))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
scale_color_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
labs(y="CFUs per mL", x="Time since treatment (hours)",
color=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.4,"cm"))
ggsave("WaterInVitro_LoperamideCFUs24.png", bg="transparent", width = 12, height = 5)
dataallCFUs %>% filter(Timepoint_hrs<80) %>%
ggplot(aes(x = Timepoint_hrs, y=CFUs_permL,
color=LoperamideTreatment, shape=LoperamideTreatment))+
facet_grid(.~Treatment)+
geom_point(size=3) +
geom_smooth(aes(lty=LoperamideTreatment, fill=LoperamideTreatment), method="lm", na.rm=TRUE, alpha=0.2)+
# stat_summary(aes(lty=LoperamideTreatment), geom="line", fun="mean", lwd=0.8) +
scale_y_continuous(trans = 'log10', # expand=c(0,0),
labels = trans_format('log10', math_format(10^.x)))+
scale_color_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
scale_fill_manual(values=c('#000000', '#1c5580', '#0fc08e'))+
scale_linetype_manual(values=c("solid","dotted","dashed"))+
labs(y="CFUs per mL", x="Time since treatment (hours)", color=NULL, fill=NULL, shape=NULL, lty=NULL)+
theme(legend.key.width = unit(1.33,"cm"))